<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@ page import="com.hzqy.commons.utils.ConstantUtils" %>
<%@ page import="com.hzqy.web.vo.PmsUserVo"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>接口增加</title>
<link rel="stylesheet" type="text/css"	href="../../static/js/themes/defalut.css">
<link rel="stylesheet" type="text/css"	href="../../static/js/themes/public.css">
<link rel="stylesheet" type="text/css"	href="../../static/js/themes/ddspstyle.css">
<link rel="stylesheet" type="text/css"	href="../../static/js/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"	href="../../static/js/themes/icon.css">
<link rel="stylesheet" type="text/css"	href="../../static/js/WdatePicker/skin/WdatePicker.css">
<script type="text/javascript" src="../../static/js/jquery.min.js"></script>
<script type="text/javascript" src="../../static/js/jquery.easyui.min.js"></script>
<script type="text/javascript"	src="../../static/js/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="../../static/js/jquery.validate.js"></script>
<script type="text/javascript" src="../../static/js/index.js"></script>
<script type="text/javascript" src="../../static/js/WdatePicker/WdatePicker.js"></script>
<script type="text/javascript" charset="utf-8" src="../../ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="../../ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" charset="utf-8" src="../../ueditor/lang/zh-cn/zh-cn.js"></script>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<%
String []nonceObj=ConstantUtils.getNonceObject();
%>
<script type="text/javascript">
	$(function() {
		$("#contentForm").validate({
			rules: {
				f_zdoi_name: {
					required: true,
				},
				f_zdoi_path: {
					required: true
				},
				f_zdoi_appsecret: {
					required: true
				},
				f_zdoi_update_cycle: {
					required: true
				}
				
			},
			messages: {
				f_zdoi_name: {
					required: "请输入接口名称",
				},
				f_zdoi_path: {
					required: "请输入接口路径",
				},
				f_zdoi_appsecret: {
					required: "请输入接口认证id",
				},
				f_zdoi_update_cycle: {
					required: "请输入接口更新周期",
				}
			}
		});
		
		$("#f_zdoi_obligate1").val("");
		$("#f_zdoi_obligate2").val("");
		$("#f_zdoi_obligate3").val(0);
		$("#f_zdoi_obligate4").val(0);

	});
	
	function _submitFm() {
		if($("#contentForm").validate().form()) {
		app_ajax('../../industry/insert_zjDataOpenInterface.do', $("#contentForm").serialize(), function(data) {
				if (data.success) {
					$.messager.progress('close');
					$.messager.alert('提示', '提交成功！', 'info', function() {
						parent.$('#dlg').dialog('close');
						parent.gotoSearch($('#easyui-treegrid'));
					});
				} else {
					$.messager.alert('提示', data.result, 'info', function() {
						$.messager.progress('close');
					});
				}
		}); 
	  }
	}
	
</script>
</head>

<body class="overfwidth">
	<div class="barnavtop">您所在的位置：浙江数据开放接口管理 &gt; 接口新增</div>
	<div id="workspace">
		<!--主体 开始-->
		<div id="container-1">
			<div class="editspace">
				<form id="contentForm" class="cmxform" enctype="multipart/form-data" name="formName">
					<input id="f_zdoi_status" name="f_zdoi_status" type="hidden" value="1" />
					<input id="f_zdoi_limitcount" name="f_zdoi_limitcount" type="hidden" value="0" />
					<input type="hidden" name="stime" value="<%=nonceObj[0]%>"/>
					<input type="hidden" name="sign" value="<%=nonceObj[1]%>"/>
					<legend style="text-align: center; margin: 0 auto;">接口新增</legend>
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="40%" align="right">
										<span class="red">*</span>接口名称:
									</td>
									<td width="60%">
										<input id="f_zdoi_name" name="f_zdoi_name" style="width: 150px;" value="" class="yl_inp yw_name" />
										<span id="f_zdoi_name_tip" class="tip"></span>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="20%" align="right">
										<span class="red">*</span>接口路径:
									</td>
									<td width="30%">
										<input id="f_zdoi_path" name="f_zdoi_path" style="width: 150px;" value="" class="yl_inp yw_name" />
										<span id="f_zdoi_path_tip" class="tip"></span>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="20%" align="right">
										<span class="red">*</span>接口认证地址:
									</td>
									<td width="30%">
										<input id="f_zdoi_appsecret" name="f_zdoi_appsecret" style="width: 150px;" value="" class="yl_inp yw_name" />
										<span id="f_zdoi_appsecret_tip" class="tip"></span>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="20%" align="right">
										是否可被访问:
									</td>
									<td width="30%">
										<select name="f_zdoi_accessed" id="f_zdoi_accessed" style="width: 150px;">
											<option value="1">可被访问</option>
											<option value="2">不可被访问</option>
										</select>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="20%" align="right">
										接口优先级:
									</td>
									<td width="30%">
										<input id="f_zdoi_index" name="f_zdoi_index" style="width: 150px;" value="0" class="yl_inp yw_name" />
										<span id="f_zdoi_index_tip" class="tip"></span>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="20%" align="right">
										是否是增量更新:
									</td>
									<td width="30%">
										<select name="f_zdoi_isIncremental" id="f_zdoi_isIncremental" style="width: 150px;">
											<option value="0">增量更新</option>
											<option value="1">非增量更新</option>
										</select>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="20%" align="right">
										<span class="red">*</span>接口更新周期:
									</td>
									<td width="30%">
										<input id="f_zdoi_update_cycle" name="f_zdoi_update_cycle" style="width: 150px;" value="" class="yl_inp yw_name" />
										<span id="f_zdoi_update_cycle_tip" class="tip"></span>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="20%" align="right">
										预留字段1:
									</td>
									<td width="30%">
										<textarea id="f_zdoi_obligate1" name="f_zdoi_obligate1" style="width: 150px; height: 50px;"></textarea>
									</td>
									<td width="20%" align="right">
										预留字段2:
									</td>
									<td width="30%">
										<textarea id="f_zdoi_obligate2" name="f_zdoi_obligate2" style="width: 150px; height: 50px;"></textarea>
									</td>
								</tr>
								<tr>
									<td width="20%" align="right">
										预留字段3:
									</td>
									<td width="30%">
										<input id="f_zdoi_obligate3" name="f_zdoi_obligate3" value="" style="width: 150px;" class="yl_inp yw_name"></input>
										<span id="f_zdoi_obligate3_tip" class="tip"></span>
									</td>
									<td width="20%" align="right">
										预留字段4:
									</td>
									<td width="30%">
										<input id="f_zdoi_obligate4" name="f_zdoi_obligate4" value="" style="width: 150px;" class="yl_inp yw_name"></input>
										<span id="f_zdoi_obligate4_tip" class="tip"></span>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="15%" align="right">
										&nbsp;接口简介:
									</td>
									<td width="85%">
										<input id="f_zdoi_desc" name="f_zdoi_desc" value="" style="width: 720px;" class="yl_inp yw_name"></input>
										<span id="f_zdoi_desc_tip" class="tip"></span>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<div class="toolbar" style="text-align: center;">
						<a class="easyui-linkbutton" data-options="iconCls:'icon-ok'"
							href="javascript:void(0);" onclick="_submitFm()">保存</a> <a
							href="javascript:void(0);" data-options="iconCls:'icon-cancel'"
							class="easyui-linkbutton"
							onclick="javascript:parent.$('#dlg').dialog('close')">取消</a>
					</div>
				</form>
			</div>
		</div>
		<!--主体 结束-->
	</div>
</body>
</html>
